﻿using Newtonsoft.Json;
using Nop.Web.Framework.Models;
using Nop.Web.Framework.Mvc.ModelBinding;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace Nop.Web.Areas.Admin.Models.Catalog
{
    public class ProductVideoModel : BaseNopEntityModel
    {

        public int ProductId { get; set; }



        public string VideoUrl { get; set; }

        public int Width { get; set; }

        public int Height { get; set; }

        public int Duration { get; set; }

        public string CoverUrl { get; set; }

        public long Size { get; set; }


        string _clientJson = null;

        [JsonIgnore()]
        [UIHint("Video")]
        [NopResourceDisplayName("Admin.Catalog.Products.Video.Fields.Video")]
        public string ClientJson
        {
            get
            {
                return JsonConvert.SerializeObject(this);
            }
        }

    }
}
